#include <stdio.h>

int main() {
    int year, mon, day;
    int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int total_days = 0;
    
    printf("请输入日期(格式: 年-月-日): ");
    scanf("%d-%d-%d", &year, &mon, &day);

    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
        days[1] = 29;
    }
    for (int i = 0; i < mon - 1; i++) {
        total_days += days[i];
    }
    total_days += day;
    printf("%d年%d月%d日是%d年的第%d天\n", year, mon, day, year, total_days);
    
    return 0;
}
